package com.whz.workmanageol.controller;

import com.whz.workmanageol.service.ExcelTempService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletResponse;

/**
 * 管理员下载Excel模板的Controller
 */
@Controller
@RequestMapping(value = "/admin/excel")
public class ExcelTempController {
    @Autowired
    private ExcelTempService excelTempService;

    @GetMapping("/studentinfo")
    public void studentinfo(HttpServletResponse response){
        excelTempService.studentInfo(response);
    }

    @GetMapping("/teacherinfo")
    public void teacherinfo(HttpServletResponse response){
        excelTempService.teacherInfo(response);
    }

    @GetMapping("/gradeinfo")
    public void gradeinfo(HttpServletResponse response){
        excelTempService.gradeInfo(response);
    }

    @GetMapping("/courseinfo")
    public void courseinfo(HttpServletResponse response){
        excelTempService.courseInfo(response);
    }

    @GetMapping("/gradecourseinfo")
    public void gradecourseinfo(HttpServletResponse response){
        excelTempService.gradeCourseInfo(response);
    }

    @GetMapping("/studentgradeinfo")
    public void studentgradeinfo(HttpServletResponse response){
        excelTempService.studentGradeInfo(response);
    }

    @GetMapping("/studentcourseinfo")
    public void studentcourseinfo(HttpServletResponse response){
        excelTempService.studentCourseInfo(response);
    }

    @GetMapping("/teachergradeinfo")
    public void teachergradeinfo(HttpServletResponse response){
        excelTempService.teacherGradeInfo(response);
    }

    @GetMapping("/teachercourseinfo")
    public void teachercourseinfo(HttpServletResponse response){
        excelTempService.teacherCourseInfo(response);
    }
}
